// 《围棋》作者版权所有。版权所有。
// 此源代码的使用受BSD样式
// 许可证的约束，该许可证可以在许可证文件中找到。

// 开始：构建openbsd&！mips64 
// /+构建openbsd，！mips64 

package runtime

import "unsafe"

// trampoline函数从Go调用约定转换为C调用约定
// 然后调用底层libc函数。这些在sys_openbsd_uu$ARCH.s中定义。go:cgo\u unsafe\u args 

func pthread_attr_init(attr *pthreadattr) int32 {
	return libcCall(unsafe.Pointer(funcPC(pthread_attr_init_trampoline)), unsafe.Pointer(&attr))
}
func pthread_attr_init_trampoline()

// go:nosplit 
// go:cgo\u unsafe\u args 
func pthread_attr_destroy(attr *pthreadattr) int32 {
	return libcCall(unsafe.Pointer(funcPC(pthread_attr_destroy_trampoline)), unsafe.Pointer(&attr))
}
func pthread_attr_destroy_trampoline()

// go:nosplit 
// go:cgo\u unsafe\u args 
func pthread_attr_getstacksize(attr *pthreadattr, size *uintptr) int32 {
	return libcCall(unsafe.Pointer(funcPC(pthread_attr_getstacksize_trampoline)), unsafe.Pointer(&attr))
}
func pthread_attr_getstacksize_trampoline()

// go:nosplit 
// go:cgo\u unsafe\u args 
func pthread_attr_setdetachstate(attr *pthreadattr, state int) int32 {
	return libcCall(unsafe.Pointer(funcPC(pthread_attr_setdetachstate_trampoline)), unsafe.Pointer(&attr))
}
func pthread_attr_setdetachstate_trampoline()

// go告诉链接器将在系统库中找到libc_*函数
func pthread_create(attr *pthreadattr, start uintptr, arg unsafe.Pointer) int32 {
	return libcCall(unsafe.Pointer(funcPC(pthread_create_trampoline)), unsafe.Pointer(&attr))
}
func pthread_create_trampoline()

// 但缺少libc_*前缀。

// go:cgo_import_dynamic libc_pthread_attr_init pthread_attr_init“libpthread.so”
// go:cgo_import_dynamic libc_pthread_attr_destroy pthread_attr_destroy libpthread.so“
// go:cgo_import____动态libc_pthread_attr_attr_attr_attr_getsize”libpthread.so
// go:cgo_导入动态libc_pthread_attr_setdetachstate pthread_attr_setdetachstate libpthread.so“
// go:cgo_导入动态libc_pthread_创建”libpthread.so“
// go:cgo_导入动态libc_pthread_sigmask pthread_sigmask”libpthread.so“

// go:cgo\u import\u dynamic\uuuu”libc.so“
